Skip to content

feat: add round domain separator to adata#8557

Open
zhongxishen wants to merge 1 commit intomasterfrom
HSM-1513
Open

feat: add round domain separator to adata#8557
zhongxishen wants to merge 1 commit intomasterfrom
HSM-1513

Conversation

@zhongxishen
Copy link
Copy Markdown
Contributor

@zhongxishen zhongxishen commented Apr 17, 2026

TICKET: HSM-1513

This is what was left to be done from https://linear.app/bitgo/issue/HSM-36/unauthenticated-dsg-session-restore-in-dsgsetsession-enables-session#comment-fd042a25.

Specifically:
"What remains valid
The absence of a round number in adata is a legitimate, though low-priority, gap. At the validateAdata() level, a Round 1 ciphertext is indistinguishable from a Round 2 ciphertext for the same transaction. We recommend addressing this as a hardening improvement, consistent with the approach taken in the HSM."

The approach is similar to what's done in hsm-firmware https://github.com/BitGo/hsm-firmware/blob/develop/src/bg/dkls23.c#L40-L41.

@zhongxishen zhongxishen force-pushed the HSM-1513 branch 4 times, most recently from cbc052c to f61af36 Compare April 20, 2026 15:29
@zhongxishen zhongxishen marked this pull request as ready for review April 20, 2026 17:49
@zhongxishen zhongxishen requested review from a team as code owners April 20, 2026 17:49
Copy link
Copy Markdown
Contributor

@zahin-mohammad zahin-mohammad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add some context for this PR (what the problem is and how this fixes that) 🙏🏾

@zhongxishen
Copy link
Copy Markdown
Contributor Author

can you add some context for this PR (what the problem is and how this fixes that) 🙏🏾

Added to the description of the PR.

zahin-mohammad
zahin-mohammad previously approved these changes Apr 20, 2026
Copy link
Copy Markdown
Contributor

@zahin-mohammad zahin-mohammad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, missing one piece, can we add a test for this?

@zahin-mohammad zahin-mohammad dismissed their stale review April 20, 2026 19:36

needs tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants